package com.kaili.basic.mapper;


import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.kaili.basic.pojo.dto.CustomerQueryDto;
import com.kaili.basic.pojo.entity.Customer;
import com.kaili.basic.pojo.entity.CustomerAllQuery;
import com.kaili.basic.pojo.entity.CustomerExport;
import com.kaili.basic.pojo.entity.CustomerPlusAddress;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;


/**
 * Created by xxx on 18-4-25.
 */

@Mapper
public interface CustomerMapper {
    //添加客户
    int addCustomer(Customer customer);

    //删除客户
    int deleteCustomer(Customer customer);

    //删除客户
    int deleteCustomers(Map<String,Object> map);

    //修改客户
    int updateCustomer(Customer customer);

    //条件查询获取客户详细信息
    List<CustomerPlusAddress> queryCustomer(Pagination page, CustomerPlusAddress customer);

    //条件查询获取客户详细信息
    Customer queryCustomerById(Long customerId);

    //根据供应商获取客户详细信息
    List<Customer> queryCustomerBySupplier(Long supplierId);

    //根据供应商模糊查询获取客户详细信息
    List<Customer> dimQueryCustomerBySupplier(Map<String,Object> map);

    //根据客户类型获取
    List<CustomerAllQuery> queryCustomerType(Integer customerType);

    //获取所有类型的客户
    List<CustomerAllQuery> queryAllCustomer();

    //查询当前数据库中的最大ID
    Long getMaxCustomerId();

    //导出
    List<CustomerExport> queryCustomerExport(CustomerQueryDto customerQueryDto);
}
